A filter allows the user to filter out allocations that match the rule specified by the filter.

When a new snapshot is displayed in the application a default set of filters are applied. This default set of filters can be adjusted here. The snapshots filters can be further modified after the snapshot has been created and these modifications will be unique to that snapshot.

Temporarily enable or disable a filter by clicking the check-box next to the filter rule.

Double click on an existing filter rule to pre populate all fields for a new rule.

A filter is comprised of the following components.

  • ID - Every allocation has several properties associated with it. These properties are listed below and are the basis for creating a new rule.
    • Type - The type of the allocation, for example "Windows Heap" or "Windows Handle File".
    • Allocation ID - A unique sequential ID number given to this allocation.
    • Thread ID - The ID of the thread that generated the allocation.
    • Heap - For heap based allocations, this is the value of the heap which serviced the allocation.
    • Allocation Value - For heap based allocations this will be the pointer value to the allocated heap chunk. For handle based allocations this will be the handle value.
    • Size - The size in bytes of this allocation.
    • Call Stack Hash - A unique 32-bit hash value of the recorded call stack.
    • User Code Hint - The symbol name of the first non external symbol in the call stack for this allocation.
    • External Code Hint - The symbol name of the last external symbol in the call stack for this allocation before the first non external symbol.
    • Allocation Hint - Several comma separated 'hint' values may be associated with an allocation:
      • freed - This allocation has been previously freed.
      • reallocated - This allocation was reallocated.
      • ignore - This allocation has been tagged as ignore, via either the API, Symbol Settings, or a special source code tag.
      • added - When comparing snapshot A against snapshots B, this allocation was not present in snapshot A.
      • removed - When comparing snapshot A against snapshots B, this allocation was not present in snapshot B.
      • equal - When comparing snapshot A against snapshots B, this allocation was present in both snapshots.
      • nosource - The call stack for this allocation has no source code files available.
    • Any Call Stack Hint - Every entry in the allocations call stack may have a comma separated 'hint' value associated with it. The 'Any Call Stack Hint' will try to match against any call stack hint entry (as opposed to matching against every call stack hint entry). The possible hints are as follows:
      • External Module - This call stack entry is from an external module.
      • Unknown Module - This call stack entry if not from any known module. This is indicative of Just In Time (JIT) compiled code.
      • TD32 Symbols - This call stack entry ware resolved with TD32 symbol information.
      • COFF Symbols - This call stack entry ware resolved with COFF symbol information.
      • PDB Symbols - This call stack entry ware resolved with PDB symbol information.
      • Export Symbol - This call stack entry ware resolved with Export symbol information.
      • DWARF Symbols - This call stack entry ware resolved with DWARF symbol information.
      • MAP Symbols - This call stack entry ware resolved with MAP symbol information.
    • Any Call Stack Module - Try to match against the module name plus byte offset for any call stack module entry (as opposed to matching against every call stack module entry).
    • Any Call Stack Symbol - Try to match against the symbol name plus offset for any call stack symbol entry (as opposed to matching against every call stack symbol entry).
    • Any Call Stack Source - Try to match against the source file path plus line offset for any call stack source entry (as opposed to matching against every call stack source entry).
    • All Call Stack Hint - Try to match against the comma separated 'hint' value for every call stack hint entry.
    • All Call Stack Module - Try to match against the module name plus byte offset for every call stack module entry.
    • All Call Stack Symbol - Try to match against the symbol name plus offset for every call stack symbol entry.
    • All Call Stack Source - Try to match against the source file path plus line offset for every call stack source entry.
  • Match - The match type matches the user specified value against the user specified ID by using one of the below rules:
    • is equal to
    • is not equal to
    • is less than
    • is more than
    • begins with
    • ends with
    • contains
    • does not contain
  • Value - The user supplied value to match against the ID.
  • Action - If the match is true then one of the below actions will be performed.
    • include - The allocation is include and will be displayed to the user.
    • exclude - The allocation is excluded and will not be displayed to the user.

The initial default filters are as follows:

  • If All Call Stack Hint contains "External Module" then exclude - This filter will exclude all allocations whose call stack is exclusively comprised of entries within external modules, ie. no non external (user code) is present in the allocations call stack.

  • If Allocation Hint contains "nosource" then exclude - This filter will exclude all allocations whose call stack does not have any source coded files (as indicated by symbol resolution) available to WonderLeak. If all allocations in a snapshot have no source code files associated with them, this rule will be disabled by default.

  • If Allocation Hint contains "ignore" then exclude - This filter will exclude all allocations that have been tagged as 'ignore'. An allocation may be tagged as ignore via one of three ways:

    1. In the case of a heap allocation, by user code calling the WonderLeakAPI_IgnoreHeapAllocation API function.
    2. By specifying a list of function names in the Symbol Settings for which allocations with call stacks that contain any of these functions will be tagged as ignore.
    3. By WonderLeak encountering an ignore comment in a source code file. This comment is in the form of a line comment such as // WonderLeak-Ignore for C/C++ code, at a location in an allocation's' call stack which is to be ignored. These comments can be inserted by right clicking on an entry in a call stack and selecting "Mark Source Line as Ignore".

    Use // WonderLeak-Ignore tags to ignore known allocation leaks in third party code, allowing you to focus on allocation leaks in your code. The comment tags can easily be located and removed if required.

Copyright © 2021, Relyze Software Limited